package com.kunchi.isb.base.validate;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

@ApiModel(value = "ISB 验证异常", description = "包含字段名,出错原因,出错值")
public class ISBFieldError {

    public ISBFieldError(String fieldName, String errorMessage, Object errorValue) {
        this.fieldName = fieldName;
        this.errorMessage = errorMessage;
        this.errorValue = errorValue;
    }

    @ApiModelProperty(value = "验证不通过的位置,可以是字段,也可以是标记", name = "出错的位置,可以是字段,也可以是标记", example = "name")
    private String fieldName = null;

    @ApiModelProperty(value = "验证不通过的原因", name = "解释出错的原因", example = "Can't be null")
    private String errorMessage = null;

    @ApiModelProperty(value = "验证不通过的原始值", name = "验证不通过的原始值", example = "0")
    private Object errorValue = null;

    public String getFieldName() {
        return fieldName;
    }

    public void setFieldName(String fieldName) {
        this.fieldName = fieldName;
    }

    public String getErrorMessage() {
        return errorMessage;
    }

    public void setErrorMessage(String errorMessage) {
        this.errorMessage = errorMessage;
    }

    public Object getErrorValue() {
        return errorValue;
    }

    public void setErrorValue(Object errorValue) {
        this.errorValue = errorValue;
    }
}
